package com.example.tests;

import org.junit.*;
import static org.junit.Assert.*;

import com.example.pages.ManagementPage;

public class DeleteOldUserTest extends BaseTest{
	
	@Test
	public void testUserDelete() throws Exception {
		ManagementPage managementPage = goToMainPage()
		.loginWithValidCredentials("admin", "admin")
		.goToUserManagementPage();
		
		int oldUserList = managementPage.getUsers().size();
		
		User user = new User();
		if(managementPage.deleteUser(user)!=null){
	
		int newUserList = managementPage.getUsers().size();
		
		assertEquals(newUserList, oldUserList-1);}
		}
	}


